package com.mc.network;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

public class CrawlWeb {
	
	private String host = "http://weibo.com/u/2726310185/home?wvr=5";
	
	public void crwal(){
		URLConnection tarConn = getURLConn(host);
		tarConn.setDoOutput(true);
		System.out.println();
	}
	
	private URLConnection getURLConn(String host){
		URLConnection tarConn=null;
		try {
			URL tarUrl = new URL(host);
			tarConn =tarUrl.openConnection();
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return tarConn;
		
	}
	public static void main(String[] args) {
		CrawlWeb cw = new CrawlWeb();
		cw.crwal();
	}
}
